<template>
	<van-collapse v-model="activeNames" :border="false" v-for="se in ses">
		<van-collapse-item>
			<template #title>
				<div>
					<div class="fold-top">
						<span>{{se.examDateSimple}}</span>
						<span class="ml10">{{se.year}}级</span>
						<span class="ml10" v-if="se.nsFlag == 1">【新高考】</span>
						<span class="ml10" v-if="se.sourceType == 1">【自定义】</span>
					</div>
					<div>
						<van-tag type="primary" size="medium" color="#3DA5F9">{{se.seExamTypeStr}}</van-tag>
						<strong class="fold-tit">{{getexamname(se.examName)}}</strong>
					</div>
					<span v-if="!se.authorized" class="red plr10">学校未授权，不能查看考试数据</span>
				</div>
			</template>
			<van-row style="text-align: center;">
				<van-col :span="span" v-for="button in buttons" :key="button">
					<van-button class="cent-but" @click="navigate(button,se.seID,se.showPaper)" :disabled="!se.authorized">{{button.name}}</van-button>
				</van-col>
			</van-row>
		</van-collapse-item>
	</van-collapse>
</template>

<script lang="ts" setup>
import { ref,reactive } from 'vue';
let activeNames=ref([]);


function getexamname(x){return x;}
function navigate(){}

let buttons= [{
		id: "report",
		name: "分析报告"
	},
	{
		id: "paper",
		name: "试卷讲评"
	},
	{
		id: "students-new",
		name: "成绩榜"
	},
]

let span=8;

let ses=reactive([{
	seID:10,
	showPaper:false,
	authorized:true,
	examName:"高三第一此考试",
	examDateSimple:"2012-12-12",
	year:"2015",
	nsFlag:1,
	sourceType:1,
	seExamTypeStr:"统考"
}]);
</script>
<style scoped>

</style>